package com.iweb.project.Category.service;

import com.iweb.project.Category.dao.CategoryDao;
import com.iweb.project.Category.dao.CategoryDaoImpl;
import com.iweb.project.Category.model.Category;
import com.iweb.project.util.PageModel;

import java.util.List;

public class CategoryServiceImpl implements CategoryService {
    CategoryDao categoryDao = new CategoryDaoImpl();
    @Override
    public List<Category> selectByPage(PageModel pageModel) {
        return categoryDao.selectByPage(pageModel);
    }

    @Override
    public int addOne(Category category) {
        return categoryDao.addOne(category);
    }

    @Override
    public Category queryById(String cid) {
        return categoryDao.queryById(cid);
    }

    @Override
    public int updateOne(Category category) {
        return categoryDao.updateOne(category);
    }

    @Override
    public int deleteById(String cid) {
        return categoryDao.deleteById(cid);
    }
}
